class_name CommonRoute
extends Object



static func go_to_worldmap(node):
	await Loading.load_path("res://worldmap/worldmap.tscn",2*randf()).complete
	if node != null:
		node.queue_free()


static func go_to_notice(data):
	var node = await Loading.load_path("res://common/notice.tscn").complete
	node.data = data

static func go_to_input():
	return await Loading.load_path("res://common/input.tscn").complete
	


		
static func go_to_employee(node):
	await Loading.load_path("res://employee/employee.tscn",2*randf()).complete
	if node != null:
		node.queue_free()

static func go_to_dialogue(key):
	var node = load("res://dialogue/dialogue.tscn").instantiate()
	Global.get_tree().get_root().add_child(node)
	node.dialogue(key)
	return node
#	var node = await Loading.load_path("res://dialogue/dialogue.tscn").complete
#	node.dialogue(key)
#	return node
